/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package res;

import xmlutils.*;
import java.util.Vector;
import org.kxml.Xml;
import org.kxml.kdom.Element;

/**
 *
 * @author Ayman
 */
public class MapData {
    
    private Vector zoomLevels = new Vector();

    public MapData(Element e) {
        if (e != null) {
            int elementsCount = e.getChildCount();
            int elementType = -1;
            for (int i = 0; i < elementsCount; i++) {
                elementType = e.getType(i);
                if (elementType != Xml.ELEMENT) {
                    continue;
                }
                zoomLevels.addElement(new ZoomLevelData(e.getElement(i)));
            }
        }
    }
    
    public int getZoomLevelsSize(){
        return zoomLevels.size();
    }
    
    public ZoomLevelData getZoomLevelAt(int i){
        return (ZoomLevelData) zoomLevels.elementAt(i);
    }
}
